<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>JSDoc: Class: Collection</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">Class: Collection</h1>

    




<section>

<header>
    
        <h2>Collection</h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    <h4 class="name" id="Collection"><span class="type-signature"></span>new Collection<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Creates a new collection. Collections store multiple documents and
handle CRUD against those documents.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line24">line 24</a>
    </li></ul></dd>
    

    

    

    
</dl>
















    
    </div>

    

    

    

     

    

    
            <h3 class="subsection-title">Methods</h3>

            <ul><li><a href="#collateAdd"><span class="type-signature">(static) </span>collateAdd<span class="signature">(collection, keyName<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#collateAdd"><span class="type-signature">(static) </span>collateAdd<span class="signature">(collection, process)</span><span class="type-signature"></span></a></li><li><a href="#drop"><span class="type-signature">(static) </span>drop<span class="signature">(removePersistent)</span><span class="type-signature"></span></a></li><li><a href="#drop"><span class="type-signature">(static) </span>drop<span class="signature">(removePersistent, callback)</span><span class="type-signature"></span></a></li><li><a href="#drop"><span class="type-signature">(static) </span>drop<span class="signature">(removePersistent)</span><span class="type-signature"></span></a></li><li><a href="#drop"><span class="type-signature">(static) </span>drop<span class="signature">(callback)</span><span class="type-signature"></span></a></li><li><a href="#drop"><span class="type-signature">(static) </span>drop<span class="signature">()</span><span class="type-signature"></span></a></li><li><a href="#drop"><span class="type-signature">(static) </span>drop<span class="signature">()</span><span class="type-signature"></span></a></li><li><a href="#drop"><span class="type-signature">(static) </span>drop<span class="signature">(callback)</span><span class="type-signature"></span></a></li><li><a href="#drop"><span class="type-signature">(static) </span>drop<span class="signature">(removePersistent, callback)</span><span class="type-signature"></span></a></li><li><a href="#grid"><span class="type-signature">(static) </span>grid<span class="signature">(selector, template, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#isLinked"><span class="type-signature">(static) </span>isLinked<span class="signature">()</span><span class="type-signature"> &rarr; {Boolean}</span></a></li><li><a href="#link"><span class="type-signature">(static) </span>link<span class="signature">(outputTargetSelector, templateSelector, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#link"><span class="type-signature">(static) </span>link<span class="signature">(scope, varName, options<span class="signature-attributes">opt</span>, beforeAngularToForerunner<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#link"><span class="type-signature">(static) </span>link<span class="signature">(scope, varName, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, options)</span><span class="type-signature"></span></a></li><li><a href="#setData"><span class="type-signature">(static) </span>setData<span class="signature">(data)</span><span class="type-signature"></span></a></li><li><a href="#setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, options, callback)</span><span class="type-signature"></span></a></li><li><a href="#setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, options, callback)</span><span class="type-signature"></span></a></li><li><a href="#setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, callback)</span><span class="type-signature"></span></a></li><li><a href="#setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, options, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(objectType, objectName, query, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(query, options, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(collectionName, query, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(objectType, objectName, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(query, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(objectType, objectName, query, options, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(collectionName, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(collectionName, query, options, callback)</span><span class="type-signature"></span></a></li><li><a href="#sync"><span class="type-signature">(static) </span>sync<span class="signature">(callback)</span><span class="type-signature"></span></a></li><li><a href="#unGrid"><span class="type-signature">(static) </span>unGrid<span class="signature">(selector, template, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#unlink"><span class="type-signature">(static) </span>unlink<span class="signature">(outputTargetSelector, templateSelector)</span><span class="type-signature"></span></a></li><li><a href="#_insertHandle"><span class="type-signature"></span>_insertHandle<span class="signature">(data, index<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#count"><span class="type-signature"></span>count<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></a></li><li><a href="#data"><span class="type-signature"></span>data<span class="signature">()</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#diff"><span class="type-signature"></span>diff<span class="signature">(collection)</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#distinct"><span class="type-signature"></span>distinct<span class="signature">(path, query<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#drop"><span class="type-signature"></span>drop<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {boolean}</span></a></li><li><a href="#dropChart"><span class="type-signature"></span>dropChart<span class="signature">(selector)</span><span class="type-signature"></span></a></li><li><a href="#ensureIndex"><span class="type-signature"></span>ensureIndex<span class="signature">(keys, options)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#explain"><span class="type-signature"></span>explain<span class="signature">(query, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#filter"><span class="type-signature"></span>filter<span class="signature">(query<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>, func)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#filterUpdate"><span class="type-signature"></span>filterUpdate<span class="signature">(query, func, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#find"><span class="type-signature"></span>find<span class="signature">(query, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#findById"><span class="type-signature"></span>findById<span class="signature">(id, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#findOne"><span class="type-signature"></span>findOne<span class="signature">()</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#findSub"><span class="type-signature"></span>findSub<span class="signature">(match, path, subDocQuery<span class="signature-attributes">opt</span>, subDocOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#findSubOne"><span class="type-signature"></span>findSubOne<span class="signature">(match, path, subDocQuery<span class="signature-attributes">opt</span>, subDocOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#group"><span class="type-signature"></span>group<span class="signature">(groupObj, arr)</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#index"><span class="type-signature"></span>index<span class="signature">(name)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#indexOf"><span class="type-signature"></span>indexOf<span class="signature">(query, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Number}</span></a></li><li><a href="#indexOfDocById"><span class="type-signature"></span>indexOfDocById<span class="signature">(itemLookup, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Number}</span></a></li><li><a href="#init"><span class="type-signature"></span>init<span class="signature">()</span><span class="type-signature"></span></a></li><li><a href="#insert"><span class="type-signature"></span>insert<span class="signature">(data, index<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#insertIndexViolation"><span class="type-signature"></span>insertIndexViolation<span class="signature">(doc)</span><span class="type-signature"> &rarr; {Boolean}</span></a></li><li><a href="#isProcessingQueue"><span class="type-signature"></span>isProcessingQueue<span class="signature">()</span><span class="type-signature"> &rarr; {Boolean}</span></a></li><li><a href="#isSubsetOf"><span class="type-signature"></span>isSubsetOf<span class="signature">(collection)</span><span class="type-signature"> &rarr; {Boolean}</span></a></li><li><a href="#lastOp"><span class="type-signature"></span>lastOp<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#load"><span class="type-signature"></span>load<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#load"><span class="type-signature"></span>load<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#loadCustom"><span class="type-signature"></span>loadCustom<span class="signature">(myData, callback)</span><span class="type-signature"></span></a></li><li><a href="#odm"><span class="type-signature"></span>odm<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Odm.html">Odm</a>}</span></a></li><li><a href="#options"><span class="type-signature"></span>options<span class="signature">(obj<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#peek"><span class="type-signature"></span>peek<span class="signature">(search, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#persistedSize"><span class="type-signature"></span>persistedSize<span class="signature">(callback)</span><span class="type-signature"></span></a></li><li><a href="#primaryKey"><span class="type-signature"></span>primaryKey<span class="signature">(keyName<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#processQueue"><span class="type-signature"></span>processQueue<span class="signature">(type, callback, resultObj<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#remove"><span class="type-signature"></span>remove<span class="signature">(query<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#removeById"><span class="type-signature"></span>removeById<span class="signature">(id)</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#removeByIndex"><span class="type-signature"></span>removeByIndex<span class="signature">(index)</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#save"><span class="type-signature"></span>save<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#save"><span class="type-signature"></span>save<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></a></li><li><a href="#saveCustom"><span class="type-signature"></span>saveCustom<span class="signature">(callback)</span><span class="type-signature"></span></a></li><li><a href="#sort"><span class="type-signature"></span>sort<span class="signature">(sortObj, arr)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#subset"><span class="type-signature"></span>subset<span class="signature">(query, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#transform"><span class="type-signature"></span>transform<span class="signature">(obj)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#transformIn"><span class="type-signature"></span>transformIn<span class="signature">(data)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#transformOut"><span class="type-signature"></span>transformOut<span class="signature">(data)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#truncate"><span class="type-signature"></span>truncate<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Collection.html">Collection</a>}</span></a></li><li><a href="#unSync"><span class="type-signature"></span>unSync<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></a></li><li><a href="#update"><span class="type-signature"></span>update<span class="signature">(query, update, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#updateById"><span class="type-signature"></span>updateById<span class="signature">(id, update, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></a></li><li><a href="#upsert"><span class="type-signature"></span>upsert<span class="signature">(obj, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></a></li><li><a href="#view"><span class="type-signature"></span>view<span class="signature">(name, query, options)</span><span class="type-signature"> &rarr; {*}</span></a></li><li><a href="#when"><span class="type-signature"></span>when<span class="signature">(query)</span><span class="type-signature"> &rarr; {<a href="Condition.html">Condition</a>}</span></a></li></ul>

            
                

    

    <h4 class="name" id=".collateAdd"><span class="type-signature">(static) </span>collateAdd<span class="signature">(collection, keyName<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Adds a data source to collate data from and specifies the
key name to collate data to.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collection</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Collection.html">Collection</a></span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The collection to collate data from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>keyName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional name of the key to collate data to.
If none is provided the record CRUD is operated on the root collection
data.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3616">line 3616</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".collateAdd"><span class="type-signature">(static) </span>collateAdd<span class="signature">(collection, process)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Adds a data source to collate data from and specifies a process
method that will handle the collation functionality (for custom
collation).
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collection</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Collection.html">Collection</a></span>


            
            </td>

            

            

            <td class="description last">The collection to collate data from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>process</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The process method.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3681">line 3681</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">(removePersistent)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Drop collection and optionally drop persistent storage.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>removePersistent</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">True to drop persistent storage, false to keep it.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodePersist.js.html">NodePersist.js</a>, <a href="NodePersist.js.html#line498">line 498</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">(removePersistent, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Drop collections and optionally drop persistent storage with callback.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>removePersistent</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">True to drop persistent storage, false to keep it.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback method.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line669">line 669</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">(removePersistent)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Drop collection and optionally drop persistent storage.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>removePersistent</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">True to drop persistent storage, false to keep it.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line643">line 643</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Drop collection and persistent storage with callback.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback method.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line631">line 631</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Drop collection and persistent storage.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line620">line 620</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Drop collection and persistent storage.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodePersist.js.html">NodePersist.js</a>, <a href="NodePersist.js.html#line475">line 475</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Drop collection and persistent storage with callback.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback method.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodePersist.js.html">NodePersist.js</a>, <a href="NodePersist.js.html#line486">line 486</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".drop"><span class="type-signature">(static) </span>drop<span class="signature">(removePersistent, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Drop collections and optionally drop persistent storage with callback.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>removePersistent</code></td>
            

            <td class="type">
            
                
<span class="param-type">Boolean</span>


            
            </td>

            

            

            <td class="description last">True to drop persistent storage, false to keep it.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Callback method.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodePersist.js.html">NodePersist.js</a>, <a href="NodePersist.js.html#line524">line 524</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".grid"><span class="type-signature">(static) </span>grid<span class="signature">(selector, template, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Creates a grid and assigns the collection as its data source.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>selector</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">jQuery selector of grid output target.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>template</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The table template to use when rendering the grid.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The options object to apply to the grid.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line561">line 561</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id=".isLinked"><span class="type-signature">(static) </span>isLinked<span class="signature">()</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    



<div class="description">
    Checks if the instance is data-bound to any DOM elements.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="AutoBind.js.html">AutoBind.js</a>, <a href="AutoBind.js.html#line46">line 46</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    True if linked, false if not.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id=".link"><span class="type-signature">(static) </span>link<span class="signature">(outputTargetSelector, templateSelector, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Creates a link to the DOM between the collection data and the elements
in the passed output selector. When new elements are needed or changes
occur the passed templateSelector is used to get the template that is
output to the DOM.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>outputTargetSelector</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>templateSelector</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional extra options.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="AutoBind.js.html">AutoBind.js</a>, <a href="AutoBind.js.html#line56">line 56</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li>unlink</li>
        </ul>
    </dd>
    

    
</dl>
















            
                

    

    <h4 class="name" id=".link"><span class="type-signature">(static) </span>link<span class="signature">(scope, varName, options<span class="signature-attributes">opt</span>, beforeAngularToForerunner<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Creates a link to the DOM between the collection data and the elements
in the passed output selector. When new elements are needed or changes
occur the passed templateSelector is used to get the template that is
output to the DOM.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>varName</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional extra options.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>beforeAngularToForerunner</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Provides an optional function
that allows you to modify data before angularJS updates ForerunnerDB with
data from a view that has changed (like when a user edits a form element
value that has been data-bound via ng-model).</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Angular.js.html">Angular.js</a>, <a href="Angular.js.html#line28">line 28</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li>unlink</li>
        </ul>
    </dd>
    

    
</dl>
















            
                

    

    <h4 class="name" id=".link"><span class="type-signature">(static) </span>link<span class="signature">(scope, varName, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Creates a link to the DOM between the collection data and the elements
in the passed output selector. When new elements are needed or changes
occur the passed templateSelector is used to get the template that is
output to the DOM.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scope</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>varName</code></td>
            

            <td class="type">
            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional extra options.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Angular.js.html">Angular.js</a>, <a href="Angular.js.html#line146">line 146</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li>unlink</li>
        </ul>
    </dd>
    

    
</dl>
















            
                

    

    <h4 class="name" id=".setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, options)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sets the collection's data to the array / documents passed.  If any
data already exists in the collection it will be removed before the
new data is set via the remove() method, and the remove event will
fire as well.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The array of documents or a single document
that will be set as the collections data.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">Optional options object.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line364">line 364</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".setData"><span class="type-signature">(static) </span>setData<span class="signature">(data)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sets the collection's data to the array / documents passed.  If any
data already exists in the collection it will be removed before the
new data is set via the remove() method, and the remove event will
fire as well.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The array of documents or a single document
that will be set as the collections data.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line350">line 350</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, options, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sets the collection's data to the array / documents passed.  If any
data already exists in the collection it will be removed before the
new data is set via the remove() method, and the remove event will
fire as well.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The array of documents or a single document
that will be set as the collections data.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">Optional options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">Optional callback function.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line410">line 410</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, options, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sets the collection's data to the array / documents passed.  If any
data already exists in the collection it will be removed before the
new data is set via the remove() method, and the remove event will
fire as well.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The array of documents or a single document
that will be set as the collections data.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">Optional options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Optional callback function.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line394">line 394</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sets the collection's data to the array / documents passed.  If any
data already exists in the collection it will be removed before the
new data is set via the remove() method, and the remove event will
fire as well.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The array of documents or a single document
that will be set as the collections data.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Optional callback function.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line379">line 379</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".setData"><span class="type-signature">(static) </span>setData<span class="signature">(data, options, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sets the collection's data to the array / documents passed.  If any
data already exists in the collection it will be removed before the
new data is set via the remove() method, and the remove event will
fire as well.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>
|

<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The array of documents or a single document
that will be set as the collections data.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">Optional options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">Optional callback function.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line426">line 426</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(objectType, objectName, query, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>objectType</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The type of object to sync to e.g.
"collection" or "view".</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>objectName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The name of the object to sync from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">A query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line480">line 480</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(query, options, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">A query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">An options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line495">line 495</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(collectionName, query, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collectionName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The collection to sync from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">A query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line467">line 467</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(objectType, objectName, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>objectType</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The type of object to sync to e.g.
"collection" or "view".</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>objectName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The name of the object to sync from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line453">line 453</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(query, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">A query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line441">line 441</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(objectType, objectName, query, options, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>objectType</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The type of object to sync to e.g.
"collection" or "view".</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>objectName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The name of the object to sync from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">A query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">An options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line522">line 522</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(collectionName, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collectionName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The collection to sync from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line429">line 429</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(collectionName, query, options, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collectionName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The collection to sync from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">A query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">An options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line508">line 508</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".sync"><span class="type-signature">(static) </span>sync<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Sync with this collection on the server-side.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The callback method to call once
the connection to the server has been established.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line418">line 418</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id=".unGrid"><span class="type-signature">(static) </span>unGrid<span class="signature">(selector, template, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Removes a grid safely from the DOM. Must be called when grid is
no longer required / is being removed from DOM otherwise references
will stick around and cause memory leaks.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>selector</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">jQuery selector of grid output target.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>template</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The table template to use when rendering the grid.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The options object to apply to the grid.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Grid.js.html">Grid.js</a>, <a href="Grid.js.html#line597">line 597</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id=".unlink"><span class="type-signature">(static) </span>unlink<span class="signature">(outputTargetSelector, templateSelector)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Removes a link to the DOM between the collection data and the elements
in the passed output selector that was created using the link() method.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>outputTargetSelector</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>templateSelector</code></td>
            

            <td class="type">
            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="AutoBind.js.html">AutoBind.js</a>, <a href="AutoBind.js.html#line186">line 186</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="_insertHandle"><span class="type-signature"></span>_insertHandle<span class="signature">(data, index<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Inserts a document or array of documents into the collection.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>
|

<span class="param-type">Array</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Either a document object or array of document</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional index to insert the record at.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Collection.html#.insertCallback">Collection.insertCallback</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional callback called
once the insert is complete.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line1834">line 1834</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="count"><span class="type-signature"></span>count<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></h4>

    



<div class="description">
    Returns the number of documents currently in the collection.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3319">line 3319</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="data"><span class="type-signature"></span>data<span class="signature">()</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Get the data array that represents the collection's data.
This data is returned by reference and should not be altered outside
of the provided CRUD functionality of the collection as doing so
may cause unstable index behaviour within the collection.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line196">line 196</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="diff"><span class="type-signature"></span>diff<span class="signature">(collection)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Generates a difference object that contains insert, update and remove arrays
representing the operations to execute to make this collection have the same
data as the one passed.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collection</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Collection.html">Collection</a></span>


            
            </td>

            

            

            <td class="description last">The collection to diff against.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3552">line 3552</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="distinct"><span class="type-signature"></span>distinct<span class="signature">(path, query<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Find the distinct values for a specified field across a single collection and
returns the values as a results array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>path</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The field path to return distinct values for e.g. "person.name".</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The query to use to filter the documents used to return values from.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The query options to use when running the query.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2157">line 2157</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="drop"><span class="type-signature"></span>drop<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    



<div class="description">
    Drops a collection and all it's stored data from the database.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">A callback method to call once the
operation has completed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line206">line 206</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    True on success, false on failure.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="dropChart"><span class="type-signature"></span>dropChart<span class="signature">(selector)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Removes a chart from the page by it's selector.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>selector</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The chart selector.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Highchart.js.html">Highchart.js</a>, <a href="Highchart.js.html#line658">line 658</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="ensureIndex"><span class="type-signature"></span>ensureIndex<span class="signature">(keys, options)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Creates an index on the specified keys.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keys</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The object containing keys to index.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">An options object.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3455">line 3455</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="explain"><span class="type-signature"></span>explain<span class="signature">(query, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Provides a query plan / operations log for a query.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The query to execute.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional options object.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2240">line 2240</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The query plan.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="filter"><span class="type-signature"></span>filter<span class="signature">(query<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>, func)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Executes a method against each document that matches query and returns an
array of documents that may have been modified by the method.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The optional query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional options object. If you specify an options object
you MUST also specify a query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>func</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The method that each document is passed to. If this method
returns false for a particular document it is excluded from the results. If you
return a modified object from the one passed to it will be included in the results
as the modified version but will not affect the data in the collection at all.
Your function will be called with a single object as the first argument and will
be called once for every document in your initial query result.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line708">line 708</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="filterUpdate"><span class="type-signature"></span>filterUpdate<span class="signature">(query, func, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Executes a method against each document that matches query and then executes
an update based on the return data of the method.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The query object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>func</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The method that each document is passed to. If this method
returns false for a particular document it is excluded from the update.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional options object passed to the initial find call.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line738">line 738</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="find"><span class="type-signature"></span>find<span class="signature">(query, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Queries the collection based on the query object passed.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The query key/values that a document must match in
order for it to be returned in the result array.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">An optional options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">!! DO NOT USE, THIS IS NON-OPERATIONAL !!
Optional callback. If specified the find process
will not return a value and will assume that you wish to operate under an
async mode. This will break up large find requests into smaller chunks and
process them in a non-blocking fashion allowing large datasets to be queried
without causing the browser UI to pause. Results from this type of operation
will be passed back to the callback once completed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2276">line 2276</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The results array from the find operation, containing all
documents that matched the query.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="findById"><span class="type-signature"></span>findById<span class="signature">(id, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Helper method to find a document by it's id.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The id of the document.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The options object, allowed keys are sort and limit.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2192">line 2192</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The items that were updated.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="findOne"><span class="type-signature"></span>findOne<span class="signature">()</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Returns one document that satisfies the specified query criteria. If multiple
documents satisfy the query, this method returns the first document to match
the query.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2709">line 2709</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="findSub"><span class="type-signature"></span>findSub<span class="signature">(match, path, subDocQuery<span class="signature-attributes">opt</span>, subDocOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Finds sub-documents from the collection's documents.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>match</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The query object to use when matching
parent documents from which the sub-documents are queried.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>path</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The path string used to identify the
key in which sub-documents are stored in parent documents.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>subDocQuery</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The query to use when matching
which sub-documents to return.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>subDocOptions</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The options object to use
when querying for sub-documents.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3340">line 3340</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="findSubOne"><span class="type-signature"></span>findSubOne<span class="signature">(match, path, subDocQuery<span class="signature-attributes">opt</span>, subDocOptions<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Finds the first sub-document from the collection's documents
that matches the subDocQuery parameter.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>match</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The query object to use when matching
parent documents from which the sub-documents are queried.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>path</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The path string used to identify the
key in which sub-documents are stored in parent documents.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>subDocQuery</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The query to use when matching
which sub-documents to return.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>subDocOptions</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The options object to use
when querying for sub-documents.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3410">line 3410</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="group"><span class="type-signature"></span>group<span class="signature">(groupObj, arr)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Groups an array of documents into multiple array fields, named by the value
of the given group path.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>groupObj</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The key path the array objects should be grouped by.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>arr</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">The array of documents to group.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2940">line 2940</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="index"><span class="type-signature"></span>index<span class="signature">(name)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Gets an index by it's name.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The name of the index to retreive.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3531">line 3531</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="indexOf"><span class="type-signature"></span>indexOf<span class="signature">(query, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    



<div class="description">
    Gets the index in the collection data array of the first item matched by
the passed query object.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The query to run to find the item to return the index of.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">An options object.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2720">line 2720</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="indexOfDocById"><span class="type-signature"></span>indexOfDocById<span class="signature">(itemLookup, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    



<div class="description">
    Returns the index of the document identified by the passed item's primary key.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>itemLookup</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The document whose primary key should be used to lookup
or the id to lookup.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">An options object.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2747">line 2747</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The index the item with the matching primary key is occupying.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="init"><span class="type-signature"></span>init<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    Creates a new collection. Collections store multiple documents and
handle CRUD against those documents.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line32">line 32</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="insert"><span class="type-signature"></span>insert<span class="signature">(data, index<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Inserts a document or array of documents into the collection.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>
|

<span class="param-type">Array</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">Either a document object or array of document</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional index to insert the record at.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Collection.html#.insertCallback">Collection.insertCallback</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional callback called
once the insert is complete.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line1798">line 1798</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="insertIndexViolation"><span class="type-signature"></span>insertIndexViolation<span class="signature">(doc)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    



<div class="description">
    Checks that the passed document will not violate any index rules if
inserted into the collection.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>doc</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The document to check indexes against.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3421">line 3421</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    Either false (no violation occurred) or true if
a violation was detected.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="isProcessingQueue"><span class="type-signature"></span>isProcessingQueue<span class="signature">()</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    



<div class="description">
    Checks if any CRUD operations have been deferred and are still waiting to
be processed.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line1777">line 1777</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    True if there are still deferred CRUD operations to process
or false if all queues are clear.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="isSubsetOf"><span class="type-signature"></span>isSubsetOf<span class="signature">(collection)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    



<div class="description">
    Checks if the collection is a subset of the passed collection.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>collection</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Collection.html">Collection</a></span>


            
            </td>

            

            

            <td class="description last">The collection to test against.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2145">line 2145</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    True if the passed collection is the parent of
the current collection.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="lastOp"><span class="type-signature"></span>lastOp<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Gets the last reporting operation's details such as run time.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3541">line 3541</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="load"><span class="type-signature"></span>load<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Loads an entire collection's data from persistent storage.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The method to call when the load function
has completed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line791">line 791</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="load"><span class="type-signature"></span>load<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Loads an entire collection's data from persistent storage.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The method to call when the load function
has completed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodePersist.js.html">NodePersist.js</a>, <a href="NodePersist.js.html#line612">line 612</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="loadCustom"><span class="type-signature"></span>loadCustom<span class="signature">(myData, callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Loads custom data loaded by a third-party plugin into the collection.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>myData</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">Data object previously saved by using saveCustom()</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">A callback method to receive notification when
data has loaded.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line896">line 896</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="odm"><span class="type-signature"></span>odm<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Odm.html">Odm</a>}</span></h4>

    



<div class="description">
    Get the ODM instance for this collection.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Odm.js.html">Odm.js</a>, <a href="Odm.js.html#line166">line 166</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Odm.html">Odm</a></span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="options"><span class="type-signature"></span>options<span class="signature">(obj<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Generates an options object with default values or adds default
values to a passed object if those values are not currently set
to anything.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional options object to modify.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2252">line 2252</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The options object.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="peek"><span class="type-signature"></span>peek<span class="signature">(search, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Finds all documents that contain the passed string or search object
regardless of where the string might occur within the document. This
will match strings from the start, middle or end of the document's
string (partial match).
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>search</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The string to search for. Case sensitive.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">A standard find() options object.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2207">line 2207</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    An array of documents that matched the search string.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="persistedSize"><span class="type-signature"></span>persistedSize<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Determines the byte size of a persisted collection
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="global.html#persistedSizeCallback">persistedSizeCallback</a></span>


            
            </td>

            

            

            <td class="description last">The method to call when the size check is complete</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line769">line 769</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="primaryKey"><span class="type-signature"></span>primaryKey<span class="signature">(keyName<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Gets / sets the primary key for this collection.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>keyName</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The name of the primary key.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line257">line 257</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="processQueue"><span class="type-signature"></span>processQueue<span class="signature">(type, callback, resultObj<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Processes a deferred action queue.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>type</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The queue name to process.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">A method to call when the queue has processed.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>resultObj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">A temp object to hold results in.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line1721">line 1721</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">(query<span class="signature-attributes">opt</span>, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Removes any documents from the collection that match the search
query key/values.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The query identifying the documents to remove. If no
query object is passed, all documents will be removed from the collection.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">An options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">A callback method.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line1603">line 1603</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    An array of the documents that were removed.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="removeById"><span class="type-signature"></span>removeById<span class="signature">(id)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Helper method that removes a document that matches the given id.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The id of the document to remove.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line1709">line 1709</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The document that was removed or undefined if
nothing was removed.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="removeByIndex"><span class="type-signature"></span>removeByIndex<span class="signature">(index)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Removes a document from the collection by it's index in the collection's
data array.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>index</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last">The index of the document to remove.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2780">line 2780</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The document that has been removed or false if none was
removed.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Saves an entire collection's data to persistent storage.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The method to call when the save function
has completed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line709">line 709</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="save"><span class="type-signature"></span>save<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Saves an entire collection's data to persistent storage.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The method to call when the save function
has completed.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodePersist.js.html">NodePersist.js</a>, <a href="NodePersist.js.html#line562">line 562</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="saveCustom"><span class="type-signature"></span>saveCustom<span class="signature">(callback)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Gets the data that represents this collection for easy storage using
a third-party method / plugin instead of using the standard persistent
storage system.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            

            

            <td class="description last">The method to call with the data response.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Persist.js.html">Persist.js</a>, <a href="Persist.js.html#line837">line 837</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
                

    

    <h4 class="name" id="sort"><span class="type-signature"></span>sort<span class="signature">(sortObj, arr)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Sorts an array of documents by the given sort path.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>sortObj</code></td>
            

            <td class="type">
            
                
<span class="param-type">*</span>


            
            </td>

            

            

            <td class="description last">The keys and orders the array objects should be sorted by.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>arr</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array</span>


            
            </td>

            

            

            <td class="description last">The array of documents to sort.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2899">line 2899</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="subset"><span class="type-signature"></span>subset<span class="signature">(query, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Uses the passed query to generate a new collection with results
matching the query parameters.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The query object to generate the subset with.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">An options object.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2118">line 2118</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="transform"><span class="type-signature"></span>transform<span class="signature">(obj)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Gets / sets the collection transform options.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">A collection transform options object.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2801">line 2801</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="transformIn"><span class="type-signature"></span>transformIn<span class="signature">(data)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Transforms data using the set transformIn method.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The data to transform.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2834">line 2834</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="transformOut"><span class="type-signature"></span>transformOut<span class="signature">(data)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Transforms data using the set transformOut method.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>data</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The data to transform.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line2866">line 2866</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="truncate"><span class="type-signature"></span>truncate<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Collection.html">Collection</a>}</span></h4>

    



<div class="description">
    Clears all data from the collection.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line555">line 555</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Collection.html">Collection</a></span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="unSync"><span class="type-signature"></span>unSync<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>

    



<div class="description">
    Disconnects an existing connection to a sync server.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="NodeApiClient.js.html">NodeApiClient.js</a>, <a href="NodeApiClient.js.html#line563">line 563</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    True if a connection existed, false
if no connection existed.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">boolean</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="update"><span class="type-signature"></span>update<span class="signature">(query, update, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Modifies an existing document or documents in a collection.
This will update all matches for 'query' with the data held
in 'update'. It will not overwrite the matched documents
with the update document.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The query that must be matched for a
document to be operated on.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>update</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The object containing updated
key/values. Any keys that match keys on the existing document
will be overwritten with this data. Any keys that do not
currently exist on the document will be added to the document.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">An options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The callback method to call when
the update is complete.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line779">line 779</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The items that were updated.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="updateById"><span class="type-signature"></span>updateById<span class="signature">(id, update, options<span class="signature-attributes">opt</span>, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>

    



<div class="description">
    Helper method to update a document via it's id.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>id</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The id of the document.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>update</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The object containing the key/values to
update to.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">An options object.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">The callback method to call when
the update is complete.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line977">line 977</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    The document that was updated or undefined
if no document was updated.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Object</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="upsert"><span class="type-signature"></span>upsert<span class="signature">(obj, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Array}</span></h4>

    



<div class="description">
    Inserts a new document or updates an existing document in a
collection depending on if a matching primary key exists in
the collection already or not.

If the document contains a primary key field (based on the
collections's primary key) then the database will search for
an existing document with a matching id. If a matching
document is found, the document will be updated. Any keys that
match keys on the existing document will be overwritten with
new data. Any keys that do not currently exist on the document
will be added to the document.

If the document does not contain an id or the id passed does
not match an existing document, an insert is performed instead.
If no id is present a new primary key id is provided for the
document and the document is inserted.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>obj</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last">The document object to upsert or an array
containing documents to upsert.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>callback</code></td>
            

            <td class="type">
            
                
<span class="param-type">function</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last">Optional callback method.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line616">line 616</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        
<div class="param-desc">
    An array containing an object for each operation
performed. Each object contains two keys, "op" contains either "none",
"insert" or "update" depending on the type of operation that was
performed and "result" contains the return data from the operation
used.
</div>



<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="view"><span class="type-signature"></span>view<span class="signature">(name, query, options)</span><span class="type-signature"> &rarr; {*}</span></h4>

    



<div class="description">
    Creates a view and assigns the collection as its data source.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>name</code></td>
            

            <td class="type">
            
                
<span class="param-type">String</span>


            
            </td>

            

            

            <td class="description last">The name of the new view.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The query to apply to the new view.</td>
        </tr>

    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The options object to apply to the view.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="View.js.html">View.js</a>, <a href="View.js.html#line1466">line 1466</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">*</span>


    </dd>
</dl>

    



            
                

    

    <h4 class="name" id="when"><span class="type-signature"></span>when<span class="signature">(query)</span><span class="type-signature"> &rarr; {<a href="Condition.html">Condition</a>}</span></h4>

    



<div class="description">
    Creates a condition handler that will react to changes in data on the
collection.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>query</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The query that will trigger the condition's then()
callback.</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line3750">line 3750</a>
    </li></ul></dd>
    

    

    
    <dt class="tag-see">See:</dt>
    <dd class="tag-see">
        <ul>
            <li><a href="Condition.html">Condition</a></li>
        </ul>
    </dd>
    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Condition.html">Condition</a></span>


    </dd>
</dl>

    


    <h5>Example</h5>
    
    <pre class="prettyprint"><code>Create a condition handler that reacts when data changes.
	var coll = db.collection('test'),
		condition = coll.when({_id: 'test1', val: 1})
		.then(function () {
			console.log('Condition met!');
	 	})
	 	.else(function () {
	 		console.log('Condition un-met');
	 	});

	 	coll.insert({_id: 'test1', val: 1});</code></pre>



            
        

    
        <h3 class="subsection-title">Members</h3>

        <ul><li><a href="#areaChart"><span class="type-signature"></span>areaChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></a></li><li><a href="#barChart"><span class="type-signature"></span>barChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></a></li><li><a href="#columnChart"><span class="type-signature"></span>columnChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></a></li><li><a href="#lineChart"><span class="type-signature"></span>lineChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></a></li><li><a href="#pieChart"><span class="type-signature"></span>pieChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></a></li><li><a href="#stackedBarChart"><span class="type-signature"></span>stackedBarChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></a></li></ul>

        
            
<h4 class="name" id="areaChart"><span class="type-signature"></span>areaChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></h4>




<div class="description">
    Creates an area chart from the collection.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="Overload.html">Overload</a></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Highchart.js.html">Highchart.js</a>, <a href="Highchart.js.html#line453">line 453</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="barChart"><span class="type-signature"></span>barChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></h4>




<div class="description">
    Creates a bar chart from the collection.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="Overload.html">Overload</a></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Highchart.js.html">Highchart.js</a>, <a href="Highchart.js.html#line553">line 553</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="columnChart"><span class="type-signature"></span>columnChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></h4>




<div class="description">
    Creates a column chart from the collection.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="Overload.html">Overload</a></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Highchart.js.html">Highchart.js</a>, <a href="Highchart.js.html#line503">line 503</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="lineChart"><span class="type-signature"></span>lineChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></h4>




<div class="description">
    Creates a line chart from the collection.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="Overload.html">Overload</a></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Highchart.js.html">Highchart.js</a>, <a href="Highchart.js.html#line392">line 392</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="pieChart"><span class="type-signature"></span>pieChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></h4>




<div class="description">
    Creates a pie chart from the collection.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="Overload.html">Overload</a></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Highchart.js.html">Highchart.js</a>, <a href="Highchart.js.html#line342">line 342</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
            
<h4 class="name" id="stackedBarChart"><span class="type-signature"></span>stackedBarChart<span class="type-signature"> :<a href="Overload.html">Overload</a></span></h4>




<div class="description">
    Creates a stacked bar chart from the collection.
</div>



    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="Overload.html">Overload</a></span>


        </li>
    </ul>





<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Highchart.js.html">Highchart.js</a>, <a href="Highchart.js.html#line603">line 603</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    


    
        <h3 class="subsection-title">Type Definitions</h3>

        
                

    

    <h4 class="name" id=".insertCallback"><span class="type-signature"></span>insertCallback<span class="signature">(result)</span><span class="type-signature"></span></h4>

    



<div class="description">
    The insert operation's callback.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>result</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">The result object will contain two arrays (inserted
and failed) which represent the documents that did get inserted and those
that didn't for some reason (usually index violation). Failed items also
contain a reason. Inspect the failed array for further information.

A third field called "deferred" is a boolean value to indicate if the
insert operation was deferred across more than one CPU cycle (to avoid
blocking the main thread).</td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Collection.js.html">Collection.js</a>, <a href="Collection.js.html#line1813">line 1813</a>
    </li></ul></dd>
    

    

    

    
</dl>
















            
    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ActiveBucket.html">ActiveBucket</a></li><li><a href="Angular.html">Angular</a></li><li><a href="AutoBind.html">AutoBind</a></li><li><a href="Collection.html">Collection</a></li><li><a href="CollectionGroup.html">CollectionGroup</a></li><li><a href="Condition.html">Condition</a></li><li><a href="Core.html">Core</a></li><li><a href="Db.html">Db</a></li><li><a href="Document.html">Document</a></li><li><a href="Grid.html">Grid</a></li><li><a href="Highchart.html">Highchart</a></li><li><a href="Index2d.html">Index2d</a></li><li><a href="IndexBinaryTree.html">IndexBinaryTree</a></li><li><a href="IndexHashMap.html">IndexHashMap</a></li><li><a href="Infinilist.html">Infinilist</a></li><li><a href="KeyValueStore.html">KeyValueStore</a></li><li><a href="Metrics.html">Metrics</a></li><li><a href="MyModule.html">MyModule</a></li><li><a href="NodeApiClient.html">NodeApiClient</a></li><li><a href="NodeApiServer.html">NodeApiServer</a></li><li><a href="NodeRAS.html">NodeRAS</a></li><li><a href="Odm.html">Odm</a></li><li><a href="OldView.html">OldView</a></li><li><a href="Operation.html">Operation</a></li><li><a href="Overload.html">Overload</a></li><li><a href="Overview.html">Overview</a></li><li><a href="Overview_init.html">init</a></li><li><a href="Path.html">Path</a></li><li><a href="Persist.html">Persist</a></li><li><a href="Procedure.html">Procedure</a></li><li><a href="ReactorIO.html">ReactorIO</a></li><li><a href="Section.html">Section</a></li><li><a href="Serialiser.html">Serialiser</a></li><li><a href="Shared.overload.html">overload</a></li><li><a href="View.html">View</a></li></ul><h3>Mixins</h3><ul><li><a href="ChainReactor.html">ChainReactor</a></li><li><a href="Common.html">Common</a></li><li><a href="Constants.html">Constants</a></li><li><a href="Events.html">Events</a></li><li><a href="Matching.html">Matching</a></li><li><a href="Shared.html">Shared</a></li><li><a href="Sorting.html">Sorting</a></li><li><a href="Tags.html">Tags</a></li><li><a href="Triggers.html">Triggers</a></li><li><a href="Updating.html">Updating</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Thu Mar 01 2018 11:34:22 GMT+0000 (GMT)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>